90203: Function test for xfi:concept-custom-attribute

Documentation

Tests of function xfi:concept-custom-attribute($concept-name as xs:QName, $attribute-name as xs:QName) as xs:string

Owners

Name Affiliation Email Start End
Herm Fischer UBMatrix / Mark V Systems fischer@markv.com 05-02-2008 at 15:14:00

References

http://www.xbrl.org/Specification/XF-PWD-2006-12-07.htm#_Toc152670666

Test Case Variations


V-01 Returns correct attribute for c1 concept a1 attribute

Documentation

Tests that element returned is attribute of specified concept.

Inputs

  • schema: concept-custom-attribute.xsd (DTS Discovery starting point) (ID=V01)
  • Function Call: xfi:concept-custom-attribute( (: concept-name argument :) QName('http://xbrl.org/formula/conformance/example','concept:c1'), (: attribute-name argument :) QName('http://xbrl.org/formula/conformance/example','concept:a1s') )

    (against file V01)

Outputs

  • Result test: $result instance of xs:string and (: expected object type :) count( $result ) eq 1 and (: expect arity :) $result eq "aaa001" (: expected value :)

V-02 Returns correct attribute for c1 concept a2 attribute

Documentation

Tests that element returned is attribute of specified concept.

Inputs

  • schema: concept-custom-attribute.xsd (DTS Discovery starting point) (ID=V02)
  • Function Call: xfi:concept-custom-attribute( (: concept-name argument :) QName('http://xbrl.org/formula/conformance/example','concept:c1'), (: attribute-name argument :) QName('http://xbrl.org/formula/conformance/example','concept:a2s') )

    (against file V02)

Outputs

  • Result test: $result instance of xs:string and (: expected object type :) count( $result ) eq 1 and (: expect arity :) $result eq "bbb001" (: expected value :)

V-03 Returns correct attribute for c1 concept a3 (qname) attribute

Documentation

Tests that element returned is attribute of specified concept.

Inputs

  • schema: concept-custom-attribute.xsd (DTS Discovery starting point) (ID=V03)
  • Function Call: xfi:concept-custom-attribute( (: concept-name argument :) QName('http://xbrl.org/formula/conformance/example','concept:c1'), (: attribute-name argument :) QName('http://xbrl.org/formula/conformance/example','concept:a3qn') )

    (against file V03)

Outputs

  • Result test: $result instance of xs:QName and (: expected object type :) count( $result ) eq 1 and (: expect arity :) $result eq (: expected value is a QName :) QName('http://xbrl.org/formula/conformance/example/myStuff','my-c1')

V-04 Returns correct attribute for t1 tuple a1 attribute

Documentation

Tests that element returned is attribute of specified concept.

Inputs

  • schema: concept-custom-attribute.xsd (DTS Discovery starting point) (ID=V04)
  • Function Call: xfi:concept-custom-attribute( (: concept-name argument :) QName('http://xbrl.org/formula/conformance/example','concept:t1'), (: attribute-name argument :) QName('http://xbrl.org/formula/conformance/example','concept:a1s') )

    (against file V04)

Outputs

  • Result test: $result instance of xs:string and (: expected object type :) count( $result ) eq 1 and (: expect arity :) $result eq "ttt001" (: expected value :)

V-05 Returns empty sequence for c2 absent a1 attribute

Documentation

Tests that empty sequence is returned when attribute is absent.

Inputs

  • schema: concept-custom-attribute.xsd (DTS Discovery starting point) (ID=V05)
  • Function Call: xfi:concept-custom-attribute( (: concept-name argument :) QName('http://xbrl.org/formula/conformance/example','concept:c2'), (: attribute-name argument :) QName('http://xbrl.org/formula/conformance/example','concept:a1s') )

    (against file V05)

Outputs

  • Result test: empty( $result ) (: nothing returned for missing attribute :)

V-06 Returns correct attribute for t1 tuple a3 qname attribute

Documentation

Tests that element returned is attribute of specified concept.

Inputs

  • schema: concept-custom-attribute.xsd (DTS Discovery starting point) (ID=V06)
  • Function Call: xfi:concept-custom-attribute( (: concept-name argument :) QName('http://xbrl.org/formula/conformance/example','concept:t1'), (: attribute-name argument :) QName('http://xbrl.org/formula/conformance/example','concept:a3qn') )

    (against file V06)

Outputs

  • Result test: $result instance of xs:QName and (: expected object type :) count( $result ) eq 1 and (: expect arity :) $result eq (: expected value is a QName :) QName('http://xbrl.org/formula/conformance/example/myStuff','my-t1')

Revisions

Name On Details
Herm Fischer 05-02-2008 at 15:14:00 Created the test case.